*** Load dataset
use "$data\2_firm_ano_perfvars_individual_paper.dta", clear  

global control i.broad_sector  i.ag_ano 


* Run the multinomial logit regression

estimate clear
tabulate q1461, generate(q1461_dummy)

mlogit q1461 assignment $control i.wave  i.strata_all_coll if wave == 2, base(1)
eststo m1: margins, dydx(assignment) predict(outcome(1)) post
qui summ q1461_dummy1 if assignment==0 
local mu : di %5.2f r(mean)
estadd local mu `mu'

mlogit q1461 assignment $control i.wave  i.strata_all_coll if wave == 2, base(1)
eststo m2: margins, dydx(assignment) predict(outcome(2)) post
qui summ q1461_dummy2 if assignment==0 
local mu : di %5.2f r(mean)
estadd local mu `mu'

mlogit q1461 assignment $control i.wave  i.strata_all_coll if wave == 2, base(1)
eststo m3: margins, dydx(assignment) predict(outcome(3)) post
qui summ q1461_dummy3 if assignment==0 
local mu : di %5.2f r(mean)
estadd local mu `mu'

esttab m1 m2 m3, scalars("mu Mean")  mtitle("No knowledge" "Moderate Knowledge" "High Knowledge") se starlevels( * 0.10 ** 0.05 *** 0.01) replace  


esttab m1 m2 m3 using "$results\01_tables\Table_S19_results_firm_knowledge.tex", scalars("mu Mean")  mtitle("No knowledge" "Moderate Knowledge" "High Knowledge") se starlevels( * 0.10 ** 0.05 *** 0.01) replace  
	
